<template>
  <div class="home">
    首页
    <div class="home-list">
      <dl v-for="(item,index) in list" :key="index" class="box">
        <dt>
          <img :src="item.img" alt="">
        </dt>
        <dd>
          {{item.title}}
          <br/>
          {{item.work}}
        </dd>
      </dl>
    </div>
  </div>
</template>

<script>
import axios from "../../utils/request";
export default {
  name: "home",

  data() {
    return {
      list: [],
    };
  },

  mounted() {
    this.Getlist()
  },

  methods: {
    Getlist() {
      axios({
        url: "/api/list",
        method: "get",
      }).then((res) => {
        // console.log(res.data.data);
        this.list = res.data.data
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.home-list {
  width: 100%;
  .box{
    width: 100%;
    height: 120px;
    padding: 5px;
    display: flex;
  }
}
</style>